3.30 \(\int (a+b \cot ^2(x))^{3/2} \tan ^2(x) \, dx\)

Optimal. Leaf size=80 \[ -b^{3/2} \tanh ^{-1}\left (\frac{\sqrt{b} \cot (x)}{\sqrt{a+b \cot ^2(x)}}\right )+(a-b)^{3/2} \tan ^{-1}\left (\frac{\sqrt{a-b} \cot (x)}{\sqrt{a+b \cot ^2(x)}}\right )+a \tan (x) \sqrt{a+b \cot ^2(x)} \]

[Out]

(a - b)^(3/2)*ArcTan[(Sqrt[a - b]*Cot[x])/Sqrt[a + b*Cot[x]^2]] - b^(3/2)*ArcTanh[(Sqrt[b]*Cot[x])/Sqrt[a + b*
Cot[x]^2]] + a*Sqrt[a + b*Cot[x]^2]*Tan[x]

________________________________________________________________________________________

Rubi [A]  time = 0.125483, antiderivative size = 80, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.412, Rules used = {3670, 474, 523, 217, 206, 377, 203} \[ -b^{3/2} \tanh ^{-1}\left (\frac{\sqrt{b} \cot (x)}{\sqrt{a+b \cot ^2(x)}}\right )+(a-b)^{3/2} \tan ^{-1}\left (\frac{\sqrt{a-b} \cot (x)}{\sqrt{a+b \cot ^2(x)}}\right )+a \tan (x) \sqrt{a+b \cot ^2(x)} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Cot[x]^2)^(3/2)*Tan[x]^2,x]

[Out]

(a - b)^(3/2)*ArcTan[(Sqrt[a - b]*Cot[x])/Sqrt[a + b*Cot[x]^2]] - b^(3/2)*ArcTanh[(Sqrt[b]*Cot[x])/Sqrt[a + b*
Cot[x]^2]] + a*Sqrt[a + b*Cot[x]^2]*Tan[x]

Rule 3670

Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
 :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[(c*ff)/f, Subst[Int[(((d*ff*x)/c)^m*(a + b*(ff*x)^n)^p)/(c^
2 + ff^2*x^2), x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ
[n, 2] || EqQ[n, 4] || (IntegerQ[p] && RationalQ[n]))

Rule 474

Int[((e_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(c*(e*x)^
(m + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q - 1))/(a*e*(m + 1)), x] - Dist[1/(a*e^n*(m + 1)), Int[(e*x)^(m + n)
*(a + b*x^n)^p*(c + d*x^n)^(q - 2)*Simp[c*(c*b - a*d)*(m + 1) + c*n*(b*c*(p + 1) + a*d*(q - 1)) + d*((c*b - a*
d)*(m + 1) + c*b*n*(p + q))*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0]
 && GtQ[q, 1] && LtQ[m, -1] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 523

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*Sqrt[(c_) + (d_.)*(x_)^(n_)]), x_Symbol] :> Dist[f/b, I
nt[1/Sqrt[c + d*x^n], x], x] + Dist[(b*e - a*f)/b, Int[1/((a + b*x^n)*Sqrt[c + d*x^n]), x], x] /; FreeQ[{a, b,
 c, d, e, f, n}, x]

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 377

Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Subst[Int[1/(c - (b*c - a*d)*x^n), x]
, x, x/(a + b*x^n)^(1/n)] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && EqQ[n*p + 1, 0] && IntegerQ[n]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \left (a+b \cot ^2(x)\right )^{3/2} \tan ^2(x) \, dx &=-\operatorname{Subst}\left (\int \frac{\left (a+b x^2\right )^{3/2}}{x^2 \left (1+x^2\right )} \, dx,x,\cot (x)\right )\\ &=a \sqrt{a+b \cot ^2(x)} \tan (x)-\operatorname{Subst}\left (\int \frac{-a (a-2 b)+b^2 x^2}{\left (1+x^2\right ) \sqrt{a+b x^2}} \, dx,x,\cot (x)\right )\\ &=a \sqrt{a+b \cot ^2(x)} \tan (x)+(a-b)^2 \operatorname{Subst}\left (\int \frac{1}{\left (1+x^2\right ) \sqrt{a+b x^2}} \, dx,x,\cot (x)\right )-b^2 \operatorname{Subst}\left (\int \frac{1}{\sqrt{a+b x^2}} \, dx,x,\cot (x)\right )\\ &=a \sqrt{a+b \cot ^2(x)} \tan (x)+(a-b)^2 \operatorname{Subst}\left (\int \frac{1}{1-(-a+b) x^2} \, dx,x,\frac{\cot (x)}{\sqrt{a+b \cot ^2(x)}}\right )-b^2 \operatorname{Subst}\left (\int \frac{1}{1-b x^2} \, dx,x,\frac{\cot (x)}{\sqrt{a+b \cot ^2(x)}}\right )\\ &=(a-b)^{3/2} \tan ^{-1}\left (\frac{\sqrt{a-b} \cot (x)}{\sqrt{a+b \cot ^2(x)}}\right )-b^{3/2} \tanh ^{-1}\left (\frac{\sqrt{b} \cot (x)}{\sqrt{a+b \cot ^2(x)}}\right )+a \sqrt{a+b \cot ^2(x)} \tan (x)\\ \end{align*}

Mathematica [B]  time = 0.704609, size = 222, normalized size = 2.78 \[ \frac{\sin (x) \sqrt{\csc ^2(x) (-((a-b) \cos (2 x)-a-b))} \left (\sqrt{a-b} \left (\sqrt{2} b^2 \tanh ^{-1}\left (\frac{\sqrt{2} \sqrt{-b} \cos (x)}{\sqrt{(a-b) \cos (2 x)-a-b}}\right )+a \sqrt{-b} \sec (x) \sqrt{(a-b) \cos (2 x)-a-b}\right )-\sqrt{2} \sqrt{-b} (a-b)^2 \tanh ^{-1}\left (\frac{\sqrt{2} \sqrt{a-b} \cos (x)}{\sqrt{(a-b) \cos (2 x)-a-b}}\right )\right )}{\sqrt{2} \sqrt{-b} \sqrt{a-b} \sqrt{(a-b) \cos (2 x)-a-b}} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Cot[x]^2)^(3/2)*Tan[x]^2,x]

[Out]

(Sqrt[-((-a - b + (a - b)*Cos[2*x])*Csc[x]^2)]*(-(Sqrt[2]*(a - b)^2*Sqrt[-b]*ArcTanh[(Sqrt[2]*Sqrt[a - b]*Cos[
x])/Sqrt[-a - b + (a - b)*Cos[2*x]]]) + Sqrt[a - b]*(Sqrt[2]*b^2*ArcTanh[(Sqrt[2]*Sqrt[-b]*Cos[x])/Sqrt[-a - b
 + (a - b)*Cos[2*x]]] + a*Sqrt[-b]*Sqrt[-a - b + (a - b)*Cos[2*x]]*Sec[x]))*Sin[x])/(Sqrt[2]*Sqrt[a - b]*Sqrt[
-b]*Sqrt[-a - b + (a - b)*Cos[2*x]])

________________________________________________________________________________________

Maple [B]  time = 0.147, size = 1276, normalized size = 16. \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*cot(x)^2)^(3/2)*tan(x)^2,x)

[Out]

-1/2/b^(5/2)/(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1/2)*b^(1/2)+a)/sin(
x)^2)*b^4-cos(x)*(-a+b)^(1/2)*ln(-4*(cos(x)*b^(1/2)*(-(cos(x)^2*a-b*cos(x)^2-a)/(cos(x)+1)^2)^(1/2)-a*cos(x)+b
*cos(x)+(-(cos(x)^2*a-b*cos(x)^2-a)/(cos(x)+1)^2)^(1/2)*b^(1/2)+a)/(-1+cos(x)))*b^4)/cos(x)/sin(x)^3/(-(cos(x)
^2*a-b*cos(x)^2-a)/(cos(x)+1)^2)^(3/2)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \cot \left (x\right )^{2} + a\right )}^{\frac{3}{2}} \tan \left (x\right )^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*cot(x)^2)^(3/2)*tan(x)^2,x, algorithm="maxima")

[Out]

integrate((b*cot(x)^2 + a)^(3/2)*tan(x)^2, x)

________________________________________________________________________________________

Fricas [A]  time = 6.8152, size = 1520, normalized size = 19. \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*cot(x)^2)^(3/2)*tan(x)^2,x, algorithm="fricas")

[Out]

[1/4*(-a + b)^(3/2)*log(-(a^2*tan(x)^4 - 2*(3*a^2 - 4*a*b)*tan(x)^2 + a^2 - 8*a*b + 8*b^2 + 4*(a*tan(x)^3 - (a
 - 2*b)*tan(x))*sqrt(-a + b)*sqrt((a*tan(x)^2 + b)/tan(x)^2))/(tan(x)^4 + 2*tan(x)^2 + 1)) + 1/2*b^(3/2)*log((
a*tan(x)^2 - 2*sqrt(b)*sqrt((a*tan(x)^2 + b)/tan(x)^2)*tan(x) + 2*b)/tan(x)^2) + a*sqrt((a*tan(x)^2 + b)/tan(x
)^2)*tan(x), sqrt(-b)*b*arctan(sqrt(-b)*sqrt((a*tan(x)^2 + b)/tan(x)^2)*tan(x)/b) + 1/4*(-a + b)^(3/2)*log(-(a
^2*tan(x)^4 - 2*(3*a^2 - 4*a*b)*tan(x)^2 + a^2 - 8*a*b + 8*b^2 + 4*(a*tan(x)^3 - (a - 2*b)*tan(x))*sqrt(-a + b
)*sqrt((a*tan(x)^2 + b)/tan(x)^2))/(tan(x)^4 + 2*tan(x)^2 + 1)) + a*sqrt((a*tan(x)^2 + b)/tan(x)^2)*tan(x), 1/
2*(a - b)^(3/2)*arctan(2*sqrt(a - b)*sqrt((a*tan(x)^2 + b)/tan(x)^2)*tan(x)/(a*tan(x)^2 - a + 2*b)) + 1/2*b^(3
/2)*log((a*tan(x)^2 - 2*sqrt(b)*sqrt((a*tan(x)^2 + b)/tan(x)^2)*tan(x) + 2*b)/tan(x)^2) + a*sqrt((a*tan(x)^2 +
 b)/tan(x)^2)*tan(x), 1/2*(a - b)^(3/2)*arctan(2*sqrt(a - b)*sqrt((a*tan(x)^2 + b)/tan(x)^2)*tan(x)/(a*tan(x)^
2 - a + 2*b)) + sqrt(-b)*b*arctan(sqrt(-b)*sqrt((a*tan(x)^2 + b)/tan(x)^2)*tan(x)/b) + a*sqrt((a*tan(x)^2 + b)
/tan(x)^2)*tan(x)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*cot(x)**2)**(3/2)*tan(x)**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*cot(x)^2)^(3/2)*tan(x)^2,x, algorithm="giac")

[Out]

Timed out